﻿<Window x:Class="XAMLStylePad.Forms.NewProjectForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="New project" Width="600" Height="140" 
        x:Name="this">
    
    <Window.Resources>
        <ResourceDictionary Source="pack://application:,,,/Themes/AppResources.xaml"/>
    </Window.Resources>
    
    <Grid Margin="10,10,10,10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="20*" MaxWidth="100" MinWidth="50"/>
            <ColumnDefinition Width="80*" MinWidth="150"/>
            <ColumnDefinition MinWidth="35"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="20"/>
            <RowDefinition MinHeight="20"/>
        </Grid.RowDefinitions>
        
        <Grid.Resources>
            <Style x:Key="label" TargetType="TextBlock">
                <Setter Property="Margin" Value="0,0,10,5"/>
                <Setter Property="HorizontalAlignment" Value="Right"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
            </Style>
            <Style x:Key="button" TargetType="Button">
                <Setter Property="Margin" Value="5,0,0,0"/>
                <Setter Property="HorizontalAlignment" Value="Right"/>
                <Setter Property="Width" Value="50"/>
            </Style>
        </Grid.Resources>
        
        <TextBlock Grid.Column="0" Grid.Row="0" Style="{StaticResource label}">
               <!--Target="{Binding ElementName=txName}">-->
            Project name
        </TextBlock>
        
        <TextBox Grid.Column="1" Grid.Row="0"
                 x:Name="txName"
                 Text="{Binding Name}"/>
        
        <TextBlock Grid.Column="0" Grid.Row="1" Style="{StaticResource label}">
               <!--Target="{Binding ElementName=txPath}">-->
            Path
        </TextBlock>
        
        <TextBox Grid.Column="1" Grid.Row="1"
                 x:Name="txPath"
                 Text="{Binding Path}"/>
        
        <Button Grid.Column="2" Grid.Row="0" Margin="5,0,10,0"
                Click="Browse_Click">
            <Image Source="{StaticResource BrowseIcon}"/>
        </Button>
        
        <StackPanel Grid.ColumnSpan="2" Grid.Column="0" Grid.Row="2" Margin="0,10,0,5"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right" Height="25">
            <Button x:Name="butOk" Style="{StaticResource button}"
                    IsDefault="True" Click="Ok_Click">
                Ok
            </Button>
            <Button x:Name="butCancel" Style="{StaticResource button}"
                    IsCancel="True">
                Cancel
            </Button>
        </StackPanel>
    </Grid>
</Window>
